﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL
{
    /// <summary>
    /// 邮箱信息
    /// </summary>
    public class EmailInfo
    {
        public EmailInfo()
        { }
        /// <summary>
        /// 添加邮箱信息
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool EmailAdd(MODEL.EmailInfo model)
        {
            return new DAL.EmailInfo().EmailAdd(model);
        }
        /// <summary>
        /// 删除邮箱信息
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>是否执行成功</returns>
        public bool EmailDelete(int id)
        {
            return new DAL.EmailInfo().EmailDelete(id);
        }
        /// <summary>
        /// 修改邮箱信息
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool EmailUpdate(MODEL.EmailInfo model)
        {
            return new DAL.EmailInfo().EmailUpdate(model);
        }
        /// <summary>
        /// 邮箱信息列表
        /// </summary>
        /// <returns>列表</returns>
        public DataSet EmailList()
        {
            return new DAL.EmailInfo().EmailList();
        }
        /// <summary>
        /// 邮箱信息列表
        /// </summary>
        /// <param name="groupId">分组编号</param>
        /// <returns>列表</returns>
        public DataSet EmailList(int groupId)
        {
            return new DAL.EmailInfo().EmailList(groupId);
        }
    }
    /// <summary>
    /// 邮箱分组
    /// </summary>
    public class EmailGroup
    {
        public EmailGroup()
        { }
        /// <summary>
        /// 添加分组信息
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool EmailGroupAdd(MODEL.EmailGroup model)
        {
            return new DAL.EmailGroup().EmailGroupAdd(model);
        }
        /// <summary>
        /// 删除分组信息
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>是否执行成功</returns>
        public bool EmailGroupDelete(int id)
        {
            return new DAL.EmailGroup().EmailGroupDelete(id);
        }
        /// <summary>
        /// 修改分组信息
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool EmailGroupUpdate(MODEL.EmailGroup model)
        {
            return new DAL.EmailGroup().EmailGroupUpdate(model);
        }
        /// <summary>
        /// 分组信息列表
        /// </summary>
        /// <returns>列表</returns>
        public DataSet EmailGroupList()
        {
            return new DAL.EmailGroup().EmailGroupList();
        }
        /// <summary>
        /// 分组信息列表
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>列表</returns>
        public DataSet EmailGroupList(int id)
        {
            return new DAL.EmailGroup().EmailGroupList(id);
        }
        /// <summary>
        /// 分组信息列表
        /// </summary>
        /// <param name="name">名称</param>
        /// <returns>列表</returns>
        public DataSet EmailGroupList(string name)
        {
            return new DAL.EmailGroup().EmailGroupList(name);
        }
    }
    /// <summary>
    /// 发送日志
    /// </summary>
    public class EmailLog
    {
        public EmailLog()
        { }
        /// <summary>
        /// 添加发送列表
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool EmailLogAdd(MODEL.EmailLog model)
        {
            return new DAL.EmailLog().EmailLogAdd(model);
        }
        /// <summary>
        /// 删除发送列表
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>是否执行成功</returns>
        public bool EmailLogDelete(int id)
        {
            return new DAL.EmailLog().EmailLogDelete(id);
        }
        /// <summary>
        /// 发送列表
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>列表</returns>
        public DataSet EmailLogList(string id)
        {
            return new DAL.EmailLog().EmailLogList(id);
        }
        /// <summary>
        /// 发送列表
        /// </summary>
        /// <param name="state">状态</param>
        /// <returns>列表</returns>
        public DataSet EmailLogList(int state)
        {
            return new DAL.EmailLog().EmailLogList(state);
        }

    }
    /// <summary>
    /// SMTP设置
    /// </summary>
    public class EmailSmtp
    {
        public EmailSmtp()
        { }
        /// <summary>
        /// 添加smtp信息
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool EmailSmtpAdd(MODEL.EmailSmtp model)
        {
            return new DAL.EmailSmtp().EmailSmtpAdd(model);
        }
        /// <summary>
        /// 删除smtp信息
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>是否执行成功</returns>
        public bool EmailSmtpDelete(int id)
        {
            return new DAL.EmailSmtp().EmailSmtpDelete(id);
        }
        /// <summary>
        /// 修改smtp信息
        /// </summary>
        /// <param name="model">信息实体</param>
        /// <returns>是否执行成功</returns>
        public bool EmailSmtpUpdate(MODEL.EmailSmtp model)
        {
            return new DAL.EmailSmtp().EmailSmtpUpdate(model);
        }
        /// <summary>
        /// smtp列表
        /// </summary>
        /// <returns>列表</returns>
        public DataSet EmailSmtpList()
        {
            return new DAL.EmailSmtp().EmailSmtpList();
        }
        /// <summary>
        /// smtp列表
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>列表</returns>
        public DataSet EmailSmtpList(int id)
        {
            return new DAL.EmailSmtp().EmailSmtpList(id);
        }
    }
}
